package fm.douban;

import fm.douban.model.Song;
import fm.douban.service.SongService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author CoderXshuai
 */
public class Application {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext("fm.douban");
        SongService songService = context.getBean(SongService.class);
        Song song = songService.get("001");
        System.out.println("得到歌曲:" + song.getName());
    }
}
